<script type="text/javascript">
function submitForm(action) {
    $(".submit").click(function(){
        /*if ("" == $.trim($("#model_name").val())) {
            popup.error("模型名称不能为空");
            return false;
        } else if ("" == $.trim($("#nid").val()) && action != 'update') {
            popup.error("模型标识不能为空");
            return false;
        } else if ("" == $.trim($("#addtable").val()) && action != 'update') {
            popup.error("数据表名称不能为空");
            return false;
        }*/

        var url = ('create' == action) ? "{:U('create')}" : "{:U('update')}";


        commonAjaxSubmit(url);
        return false;
    });
}
</script>
